<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:replace="${title}">博客详情</title>

    <!--引入图标-->
    <link rel="icon" type="image/x-icon" href="../static/favicon.ico" th:href="@{/favicon.ico}"/>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" href="../static/css/typo.css" th:href="@{/css/typo.css}">
    <link rel="stylesheet" href="../static/css/animate.css" th:href="@{/css/animate.css}">
    <link rel="stylesheet" href="../static/lib/prism/prism.css" th:href="@{/lib/prism/prism.css}">
    <link rel="stylesheet" href="../static/lib/tocbot/tocbot.css" th:href="@{/lib/tocbot/tocbot.css}">
    <link rel="stylesheet" href="../static/css/me.css" th:href="@{/css/me.css}">

    <!--看板娘-->
    <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css"/>
    <script src="https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget/autoload.js"></script>

    <!--鼠标点击特效-->
    <canvas width="1777" height="841"
            style="position: fixed; left: 0px; top: 0px; z-index: 999; pointer-events: none;"></canvas>

</head>
<body>


<!--导航-->
<nav th:fragment="menu(n)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">Blog</h2>
            <a href="#" th:href="@{/}" class="m-item item m-mobile-hide " th:classappend="${n==1} ? 'active'"><i
                    class="mini home icon"></i>首页</a>
            <a href="#" th:href="@{/types/-1}" class="m-item item m-mobile-hide" th:classappend="${n==2} ? 'active'"><i
                    class="mini idea icon"></i>分类</a>
            <a href="#" th:href="@{/tags/-1}" class="m-item item m-mobile-hide" th:classappend="${n==3} ? 'active'"><i
                    class="mini tags icon"></i>标签</a>
            <a href="#" th:href="@{/archives}" class="m-item item m-mobile-hide" th:classappend="${n==4} ? 'active'"><i
                    class="mini clone icon"></i>归档</a>
            <a href="#" th:href="@{/about}" class="m-item item m-mobile-hide" th:classappend="${n==5} ? 'active'"><i
                    class="mini info icon"></i>关于我</a>
            <a href="#" th:href="@{/admin/index}" class="m-item item m-mobile-hide" th:classappend="${n==5} ? 'active'"><i
                    class="mini info icon"></i>博客管理</a>
            <div class="right m-item item m-mobile-hide">
                <form name="search" action="#" th:action="@{/search}" method="post" target="_blank">
                    <div class="ui icon inverted transparent input m-margin-tb-tiny">
                        <input type="text" name="query" placeholder="Search...." th:value="${query}">
                        <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>


<!--底部footer-->
<footer th:fragment="footer" class="ui inverted vertical segment m-padded-tb-massive">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img src="../static/images/wechat.jpg" th:src="@{/images/wechat.jpg}" class="ui rounded image"
                             alt="" style="width: 110px">
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">最新博客</h4>
                <div id="newblog-container">
                    <div class="ui inverted link list" th:fragment="newblogs">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="item m-text-thin"
                           th:each="blog : ${newblogs}" th:text="${blog.title}">用户故事（User Story）</a>
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item m-text-thin">Email：1785791276@qq.com</a>
                    <a href="#" class="item m-text-thin">QQ：1785791276</a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">临江仙·梦后楼台高锁</h4>
                <p class="m-text-thin m-text-spaced m-opacity-mini">
                    梦后楼台高锁，酒醒帘幕低垂。去年春恨却来时。落花人独立，微雨燕双飞。</p>
                <p class="m-text-thin m-text-spaced m-opacity-mini">
                    记得小苹初见，两重心字罗衣。琵琶弦上说相思。当时明月在，曾照彩云归。</p>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <div style="color: #F08047;margin-top: -18px" class="ui inverted m-text-thin m-text-spaced">我的客栈已营业：<span id="htmer_time" class="item m-text-thin"></span> (*๓´╰╯`๓)</div>
        <div style="color: #F08047;margin-top: 0px" class="ui inverted m-text-thin m-text-spaced">ICP备案号：<a rel="nofollow" style="color:#F08047 " href="http://beian.miit.gov.cn" target="_blank">豫ICP备2020032250号-1</a></div>
        <div style="color: #F08047;margin-top: 0px" class="ui inverted m-text-thin m-text-spaced">公安联网备案号：<a rel="nofollow" style="color:#F08047 " href="http://www.beian.gov.cn" target="_blank">41132402411665</a></div>
    </div>

</footer>

<th:block th:fragment="script">
    <!--音乐播放器-->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css">
    <script src="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js"></script>
    <div id="aplayer" class="aplayer" data-autoplay="true" data-id="4904773731" data-server="netease"
         data-type="playlist" data-fixed="true" data-listfolded="true" data-order="random" data-theme="#F58EA8"></div>
    <script src="https://unpkg.com/meting@1.2.0/dist/Meting.min.js"></script>

    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
    <script src="../static/lib/prism/prism.js" th:src="@{/lib/prism/prism.js}"></script>
    <script src="../static/lib/tocbot/tocbot.min.js" th:src="@{/lib/tocbot/tocbot.min.js}"></script>
    <script src="../static/lib/qrcode/qrcode.min.js" th:src="@{/lib/qrcode/qrcode.min.js}"></script>
    <script src="../static/lib/waypoints/jquery.waypoints.min.js"
            th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>

    <!--添加雪花动态效果-->
    <script src="../static/js/snowflake.js" th:src="@{/js/snowflake.js}"></script>

    <!--鼠标点击特效-->
    <script src="../static/js/mouse-click.js" th:src="@{/js/mouse-click.js}"></script>

    <!--背景彩带特效-->
    <!--    <script src="../static/js/ribbon.js" th:src="@{/js/ribbon.js}"></script>-->

    <!--背景线条特效-->
    <script type="text/javascript" color="47,135,193" opacity='0.5' zIndex="-2" count="199"
            src="../static/js/canvas-nest.min.js" th:src="@{/js/canvas-nest.min.js}"></script>


    <script>
        $('#newblog-container').load(/*[[@{/footer/newblog}]]*/"/footer/newblog");
        // 运行时间统计
        function secondToDate(second) {
            if (!second) {
                return 0;
            }
            var time = new Array(0, 0, 0, 0, 0);
            if (second >= 365 * 24 * 3600) {
                time[0] = parseInt(second / (365 * 24 * 3600));
                second %= 365 * 24 * 3600;
            }
            if (second >= 24 * 3600) {
                time[1] = parseInt(second / (24 * 3600));
                second %= 24 * 3600;
            }
            if (second >= 3600) {
                time[2] = parseInt(second / 3600);
                second %= 3600;
            }
            if (second >= 60) {
                time[3] = parseInt(second / 60);
                second %= 60;
            }
            if (second > 0) {
                time[4] = second;
            }
            return time;
        }
        function setTime() {
            /*此处为网站的创建时间*/
            var create_time = Math.round(new Date(Date.UTC(2020, 01, 25, 15, 15, 15)).getTime() / 1000);
            var timestamp = Math.round((new Date().getTime() + 8 * 60 * 60 * 1000) / 1000);
            currentTime = secondToDate((timestamp - create_time));
            currentTimeHtml = currentTime[0] + '年' + currentTime[1] + '天'
                + currentTime[2] + '时' + currentTime[3] + '分' + currentTime[4]
                + '秒';
            document.getElementById("htmer_time").innerHTML = currentTimeHtml;
        }
        setInterval(setTime, 1000);
    </script>
</th:block>

</body>
</html>